<?php //tailvh@gmail.com



//require models file
require_once ROOT_APPLICATION_MODULES_ADMIN_MODELS.DS."Users.php";

class Admin_IndexController extends Zend_Controller_Action
{
    ///////////////////////
    // V A R I A B L E S //
    ///////////////////////
    private $modelUser;
    private $currentUser;
    
    /////////////////////
    // O V E R I D E S //
    /////////////////////    
    public function init()
    {
        if (Zend_Auth::getInstance()->getIdentity() == FALSE) {         
            $this->_redirect('admin/auth/login');
        } 
        $layoutPath = APPLICATION_PATH . '/templates/admin/default';
        $option = array('layout' => 'index',
            'layoutPath' => $layoutPath);

        Zend_Layout::startMvc($option);
        
        //init variable
        //MODEL
        $this->modelUser = new End_Models_Users();
        
        //OTHER 
        $this->currentUser = $this->getInforUser();
        
        //VIEW 
        $this->view->currentUser = $this->currentUser; 
        /* Initialize action controller here */
    }
    
    ///////////////////
    // U T I L I E S //
    ///////////////////
    private function getInforUser() {
        try {
            $currentUser = Zend_Auth::getInstance()->getIdentity();
            return $currentUser;
        } catch (Zend_Exception $ex) {
            
        }
    }
	

    public function indexAction() {
            
	}

}